#ifndef MONITROPRO_PUSHGATEWAY_CLIENT_H
#define MONITROPRO_PUSHGATEWAY_CLIENT_H

#include "php_monitorpro.h"
#include "scaler.h"

#include <map>
#include <string>

class PushGatewayClient
{
private:
    std::string data;
    long lasttime = 0;

public:
    static PushGatewayClient *instance;

    long pid;

private:
    PushGatewayClient(){};

public:
    static PushGatewayClient *newInstance();
    static void send(std::string collect, long size);

    std::string getData();
    void setCounter(Scaler *sc);
    void setBucket(Scaler *sc, double seconds);
    void run();
    void clean();
    bool isEmpty();
    bool isInterval();
};

#endif